﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Timers;
using System.Threading.Tasks;
using KC.DataAccess.Global;

namespace KC.Business.Scheduler.ScheduledPlugins
{
	public class Maintenance : ScheduledPluginBase
	{
		public override void Dispose()
		{
		}
		protected override void CloseInner()
		{
		}
		protected override void FailInner()
		{
		}
		protected async override void RunInner()
		{
			await SQL.ExecuteNonQuery(ConnStr, "delete JobRuns where datediff(day, submitted, getdate()) > 30");
			await SQL.ExecuteNonQuery(ConnStr, "truncate table Errors");
		}
		
	}
}
